package org.iabako.client.ui.page.business.service;

import org.iabako.client.config.page.PageConfigEnum;
import org.iabako.client.navigation.NavigationController;
import org.iabako.client.tools.IabakoAsyncCallback;
import org.iabako.client.ui.form.business.service.ServiceForm;
import org.iabako.shared.entity.business.AbstractEntity;
import org.iabako.shared.entity.business.Service;

/**
 * TODO javadoc
 * Date: 24/11/13
 * Time: 18:22
 */
public class ServiceModify extends ServiceForm {

    public ServiceModify() {
        super(PageConfigEnum.ServiceModify, "");

        String[] params = NavigationController.getInstance().getParams();

        serviceServiceAsync.getById(Long.parseLong(params[0]), new IabakoAsyncCallback<AbstractEntity>() {
            public void onSuccess(AbstractEntity result) {

                setService((Service) result);

                super.onSuccess(result);
            }
        });
    }
}
